package com.lagou.ex.docker.service.impl;

import com.lagou.ex.docker.entity.Tbuser;
import com.lagou.ex.docker.mapper.UserMapper;
import com.lagou.ex.docker.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Resource
    private UserMapper userMapper;

    @Override
    public List<Tbuser> queryUsers() {
        return this.userMapper.selectList(null);
    }

    @Override
    public void updateUser(Tbuser bean) {
        userMapper.updateById(bean);
    }

    @Override
    public void deleteUser(Integer id) {
        userMapper.deleteById(id);
    }

    @Override
    public void saveUser(Tbuser bean) {
        userMapper.insert(bean);
    }

}
